package com.ruoyi.shebei.service.impl;

import java.time.LocalDate;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shebei.mapper.MaintenanceWarningMapper;
import com.ruoyi.shebei.domain.MaintenanceWarning;
import com.ruoyi.shebei.service.IMaintenanceWarningService;

/**
 * 保养到期提醒Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-29
 */
@Service
public class MaintenanceWarningServiceImpl implements IMaintenanceWarningService 
{
    @Autowired
    private MaintenanceWarningMapper maintenanceWarningMapper;

    /**
     * 查询保养到期提醒
     * 
     * @param warningId 保养到期提醒主键
     * @return 保养到期提醒
     */
    @Override
    public MaintenanceWarning selectMaintenanceWarningByWarningId(Long warningId)
    {
        return maintenanceWarningMapper.selectMaintenanceWarningByWarningId(warningId);
    }

    /**
     * 查询保养到期提醒列表
     * 
     * @param maintenanceWarning 保养到期提醒
     * @return 保养到期提醒
     */
    @Override
    public List<MaintenanceWarning> selectMaintenanceWarningList(MaintenanceWarning maintenanceWarning)
    {
        return maintenanceWarningMapper.selectMaintenanceWarningList(maintenanceWarning);
    }

    /**
     * 新增保养到期提醒
     * 
     * @param maintenanceWarning 保养到期提醒
     * @return 结果
     */
    @Override
    public int insertMaintenanceWarning(MaintenanceWarning maintenanceWarning)
    {
        return maintenanceWarningMapper.insertMaintenanceWarning(maintenanceWarning);
    }

    /**
     * 修改保养到期提醒
     * 
     * @param maintenanceWarning 保养到期提醒
     * @return 结果
     */
    @Override
    public int updateMaintenanceWarning(MaintenanceWarning maintenanceWarning)
    {
        return maintenanceWarningMapper.updateMaintenanceWarning(maintenanceWarning);
    }

    /**
     * 批量删除保养到期提醒
     * 
     * @param warningIds 需要删除的保养到期提醒主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceWarningByWarningIds(Long[] warningIds)
    {
        return maintenanceWarningMapper.deleteMaintenanceWarningByWarningIds(warningIds);
    }

    /**
     * 删除保养到期提醒信息
     * 
     * @param warningId 保养到期提醒主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceWarningByWarningId(Long warningId)
    {
        return maintenanceWarningMapper.deleteMaintenanceWarningByWarningId(warningId);
    }
}
